import pickle
import numpy as np
# 数据维度不足，提升数据维度
X=None
Y=None
for i in range(0,43):
    path="csv"+str(i)
    path1="AQI"+str(i)
    with open(path,'rb') as f:
        X1=pickle.load(f)
    with open(path1,'rb') as f:
        Y1=pickle.load(f)
    if(X1 is None):
        continue
    else:
        print(X1.shape)
        print(Y1.shape)
        X1=X1.reshape([14,X1.shape[1]])
        if X is None:
            X = X1
            X = np.asarray(X1)
        else:
            col = X1
            col = np.asarray(col)
            X = np.hstack((X, col))
        if Y is None:
            Y = Y1
            Y = np.asarray(Y1)
        else:
            col = Y1
            col = np.asarray(col)
            Y = np.hstack((Y, col))
print(Y.shape)
print(X.shape)
with open("enddata_x",'wb') as f:
    pickle.dump(X,f)
with open("enddata_y",'wb') as f:
    pickle.dump(Y,f)